package itheima.com.socketdemo6;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;

public class ClientDemo {
    public static void main(String[] args) throws IOException {
        //创建一个Socket对象
       Socket socket = new Socket("127.0.0.1",10000);

       //获取IO流数据
        OutputStream os = socket.getOutputStream();
        os.write("Hello".getBytes());

        //释放资源
        os.close();
        socket.close();
    }
}
